POV-Ray : Newsgroups : povray.general : Toroidal warp : Re: Toroidal warp Server Time
30 Jul 2024 20:25:24 EDT (-0400)
  Re: Toroidal warp  
From: SharkD
Date: 27 Jun 2008 20:35:00
Message: <web.4865871da2e11e9c1d9045be0@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> I'm having trouble mapping an image to a torus. The patter seems to be mirrored
> above and below the torus's "equator". Is there a way to get this to stop?
>
> -Mike

I managed to fix it. However, I would like to apply a toroidal warp to the
"lemon" portion of torus whose minor radius is greater than its major radius. I
am wondering how the mapping is applied in this case? Since the torus intersects
itself, there are two possible versions of the pigment that could get applied.
How does POV-Ray behave in this case? Here's what I've got so far and am having
trouble making sense of it:

torus
{
 #local Width = 64;
 #local Height = 64;
 #local Radius = Width/2/cos(pi/4);
 Width/2, Radius
// rotate x * 90
 clipped_by {cylinder {-y*Height/2,y*Height/2,Width}}
 texture
 {
  pigment
  {
   image_map {png "texture_bowels_test.png"}
   translate y * 1/2
   rotate x * 180
   scale 1/4
   warp
   {
    toroidal
    orientation z
    dist_exp 0
    major_radius -Width
   }
  }
 }
 translate y*Height/2
 translate Left_Vector*+1/2
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.